﻿// JSON C# Class Generator
// http://at-my-window.blogspot.com/?page=json-class-generator

using System;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;
using TomatoSynchronizer.Store;

namespace TomatoSynchronizer.Entities 
{

    public class VariantData 
    {
    	public override bool Equals(object obj)
		{
			if(obj is VariantData)
			{
				VariantData data = (VariantData)obj;
				if(data.Image.Equals(_image) && data._variants_download_file == _variants_download_file && data._variants_model == _variants_model && data._variants_net_price == _variants_net_price && data._variants_quantity == _variants_quantity && data._variants_sku == _variants_sku && data._variants_status == _variants_status)
				{
					return true;
				}
			}
			
			return false;
		}

        public VariantData()
        {
        }

        private JObject __jobject;
        public VariantData(JObject obj)
        {
            this.__jobject = obj;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }       

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_quantity;
        public string variants_quantity
        {
            get
            {
                if(_variants_quantity == null)
                    _variants_quantity = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_quantity"));
                return _variants_quantity;
            }
            set
            {
                _variants_quantity = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_sku;
        public string variants_sku
        {
            get
            {
                if(_variants_sku == null)
                    _variants_sku = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_sku"));
                return _variants_sku;
            }
            set
            {
                _variants_sku = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_net_price;
        public string variants_net_price
        {
            get
            {
                if(_variants_net_price == null)
                    _variants_net_price = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_net_price"));
                return _variants_net_price;
            }
            set
            {
                _variants_net_price = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_model;
        public string variants_model
        {
            get
            {
                if(_variants_model == null)
                    _variants_model = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_model"));
                return _variants_model;
            }
            set
            {
                _variants_model = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_weight;
        public string variants_weight
        {
            get
            {
                if(_variants_weight == null)
                    _variants_weight = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_weight"));
                return _variants_weight;
            }
            set
            {
                _variants_weight = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private int _variants_status;
        public int variants_status
        {
            get
            {
                if(_variants_status == null)
                    _variants_status = JsonClassHelper.ReadInteger(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_status"));
                return _variants_status;
            }
            set
            {
                _variants_status = value;
            }
        }
        
        private ProductImage _image;        
		public ProductImage Image {
			get { return _image; }
			set { _image = value; }
		}

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_image;
        public string variants_image
        {
            get
            {
                if(_variants_image == null)
                    _variants_image = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_image"));
                return _variants_image;
            }
            set
            {
                _variants_image = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_download_filename;
        public string variants_download_filename
        {
            get
            {
                if(_variants_download_filename == null)
                    _variants_download_filename = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_download_filename"));
                return _variants_download_filename;
            }
            set
            {
                _variants_download_filename = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_download_cachefilename;
        public string variants_download_cachefilename
        {
            get
            {
                if(_variants_download_cachefilename == null)
                    _variants_download_cachefilename = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_download_cachefilename"));
                return _variants_download_cachefilename;
            }
            set
            {
                _variants_download_cachefilename = value;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private string _variants_download_file;
        public string variants_download_file
        {
            get
            {
                if(_variants_download_file == null)
                    _variants_download_file = JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "variants_download_file"));
                return _variants_download_file;
            }
            set
            {
                _variants_download_file = value;
            }
        }

    }
}
